package com.jadows.tdog.repository;

import com.jadows.tdog.domain.ChatRoom;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.Set;

@Repository
public interface ChatRoomRepository extends MongoRepository<ChatRoom, Long> {

    /**
     * 查询包含指定用户的群聊
     *
     * @param uid 用户 ID
     * @return 群聊列表
     */
    Set<ChatRoom> findAllByMemberIdsContains(String uid);

}
